﻿@model ProductOverviewModel
@using Nop.Core.Domain.Orders;
@using Nop.Web.Models.Catalog;
@{
    //prepare "Add to cart" AJAX link
    string addtocartlink = "";
    var shoppingCartTypeId = (int)ShoppingCartType.ShoppingCart;
    var quantity = 1;
    if (Model.ProductPrice.ForceRedirectionAfterAddingToCart)
    {
        addtocartlink = Url.RouteUrl("AddProductToCart", new { productId = Model.Id, shoppingCartTypeId = shoppingCartTypeId, quantity = quantity, forceredirection = Model.ProductPrice.ForceRedirectionAfterAddingToCart });
    }
    else
    {
        addtocartlink = Url.RouteUrl("AddProductToCart", new { productId = Model.Id, shoppingCartTypeId = shoppingCartTypeId, quantity = quantity, });
    }    
}
<div class="product-item" data-productid="@Model.Id">
    <div class="picture">
        @*<a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })" title="@Model.DefaultPictureModel.Title">
            <img alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" />
        </a>*@
        <span title="@Model.DefaultPictureModel.Title">
            <img alt="@Model.DefaultPictureModel.AlternateText" src="@Model.DefaultPictureModel.ImageUrl" title="@Model.DefaultPictureModel.Title" />
        </span>
</div>
    <div>
        <h2 class="product-title2">
            @*<a href="@Url.RouteUrl("Product", new { SeName = Model.SeName })"><span>@Model.Name</span></a>*@
            <span>@Model.Name</span>
            </h2>
            @if (!String.IsNullOrWhiteSpace(Model.FullDescription))
            {
                    <div class="call-text">
                        @Html.Raw(Model.FullDescription)
                    </div>
            }
        <div class="description">
            @Html.Raw(Model.ShortDescription)
            <span>Please call or email us for assistance reserving time for customized experiences and large group events.</span>
        </div>
        <div class="add-info">
            <div class="prices">
                @if (!String.IsNullOrEmpty(Model.ProductPrice.OldPrice))
                {
                    <span class="price old-price">@Model.ProductPrice.OldPrice</span>
                }
                <span class="price actual-price">@Model.ProductPrice.Price</span>
            </div>
            <div class="buttons2">
                @*<input type="button" value="@T("Products.Details")" class="button-1 product-box-detail-button" onclick="setLocation('@Url.RouteUrl("Product", new { SeName = Model.SeName })')" />*@
                @*@if (!Model.ProductPrice.DisableBuyButton)
                {
                    <input type="button" value="@(Model.ProductPrice.AvailableForPreOrder ? T("ShoppingCart.PreOrder") : T("ShoppingCart.AddToCart"))" class="button-2 product-box-add-to-cart-button" onclick="AjaxCart.addproducttocart('@addtocartlink');return false;" />

                }
                else 
                {
                    <input type="button" value="Book Now" class="button-2 product-box-booknow-button" onclick="alert('This should Launch Reservation Page')" />
                }*@
                @Html.ActionLink(
                    "Book Now",
                    "ReservationDaily",
                    "Reservation",
                    new { selectedDate = DateTime.Now.ToShortDateString(), productId = Model.Id, quantity = 1 },
                    new { @class = "button-2 product-box-booknow-button" })
            </div>
            @Html.Widget("productbox_add_info")
        </div>
    </div>
</div>
